
package setOfEquation;
public class Solve 
{
	private int a,b,c,d,e,f;
	public void setA(int a)
	{
		this.a=a;
	}
	
	public void setB(int b){
		this.b=b;
	}
	public void setC(int c){
		this.c=c;
	}
	public void setD(int d){
		this.d=d;
	}
	public void setE(int e){
		this.e=e;
	}
	public void setF(int f){
		this.f=f;
	}
	public int getA(){return a;}
	public int getB(){return b;}
	public int getC(){return c;}
	public int getD(){return d;}
	public int getE(){return e;}
	public int getF(){return f;}
	public String solve()
	{
		 float dx,dy,D,x,y;
	     D=a*e-d*b;
	     dx=b*f-e*c;
	     dy=c*d-a*f;
	     if(D==0&&(dx!=0||dy!=0))
	    	 return "No roof";
	     else 	 
	    	 if(D==0&&dx==0&&dy==0)
	    		 return "Many roofs";
	    	 else		 
	    		 {	 
	    			 x=-dx/D;y=-dy/D;
	    			 return	"X = "+x+"  &  Y = "+y+" ";
	    		 }
	}
}